<%@ page import="java.util.Date" %>
<%@ page import="cn.school.mybatis.pojo.Admin" %><%--
  Created by IntelliJ IDEA.
  User: zhaoyang
  Date: 2020/8/3
  Time: 11:43 上午
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>欢迎登录</title>
</head>
<body>
<%
    //String name=request.getParameter("username");
   Admin name = (Admin) session.getAttribute("USER_LOGIN");
    if (name == null) {
%>
<script>
    if (confirm("请登录账号！")) {
        location.replace("<%=request.getContextPath()%>/AdminLTEdemo01/s_login/login.jsp");
    } else {
        location.replace("<%=request.getContextPath()%>/AdminLTEdemo01/s_login/loginFail.jsp");
    }
</script>

<%
} else {
%>
<script>
    alert("登录成功！<%=name.getUsername()%>欢迎您！")
    location.replace("<%=request.getContextPath()%>/AdminLTEdemo01/home.jsp")
</script>
<%
    }
%>
<div>


</div>
</body>
</html>
